// @editor: DejaVu aka Chris

void npc(Player @player, NPC @npc) {
	int state = npc.getState();
	if(state == 0) {
		npc.addText("A half-written letter... maybe it's important! Should I take a look?");
		npc.sendNext();
	}
	else if(state == 1) {
		if(player.getItemAmount(4031839) >= 1) {
			npc.addText("I've already picked one up. I don't think I'll need to pick up another one.");
			npc.sendOK();
			npc.end();
		} else {
			player.giveItem(4031839, 1);
			npc.addText("I can barely make this out... but it reads Kyrin.");
			npc.sendOK();
			npc.end();
		}
	}
}